#include <iostream>

using namespace std;
//结构体嵌套结构体:结构体中的成员可以是另一个结构体

//学生结构体定义
struct Student {
    string name;//学生姓名
    int age;//学生年龄
    int score;//学生成绩
};

//教师结构体定义
struct Teacher {
    int id;//教师编号
    string name;//教师姓名
    int age;//教师年龄
    struct Student student;//辅导的学生
};

int main() {
    //创建教师
    struct Teacher teacher;
    teacher.id = 10001;
    teacher.name = "王老师";
    teacher.age = 65;
    teacher.student.name = "张三";
    teacher.student.age = 18;
    teacher.student.score = 95;
    cout << "教师的姓名为" << teacher.name << ",编号为" << teacher.id << ",年龄为" << teacher.age << "\n教师辅导的学生姓名为"
         << teacher.student.name << ",年龄为" << teacher.student.age << ",成绩为" << teacher.student.score << endl;
    return 0;
}
